package day3.匿名内部类.demo1;

public class Test {
    public static void main(String[] args) {
        Person p0 = new Child();
        p0.eat();
        int a=10;
        Person p1 = new Person(){
            public void eat() {
                System.out.println("匿名内部类。。。。");

                System.out.println(a);
            }

        };
        p1.eat();
        System.out.println(p1.getClass().getName());
    }
}
